//
//  MsgDetailCtrl.m
//  Traveling
//
//  Created by Northwan on 15/6/3.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//  资讯详情

#import "MsgDetailCtrl.h"
#import "NJKWebViewProgress.h"
#import "MsgDetailHeaderView.h"
#import "HeaderWebView.h"
@interface MsgDetailCtrl ()<UIWebViewDelegate>
@property (weak, nonatomic)  MsgDetailHeaderView *headerView;
@property (strong, nonatomic) MessageResult *result;
@end

@implementation MsgDetailCtrl

-(instancetype)initWithData:(MessageResult *)result{
    self = [super init];
    if(self){
       self =  [[MsgDetailCtrl alloc]init];
       self.result = result;
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.navigationItem setTitle:@"资讯详情"];
    
    self.headerView = [MsgDetailHeaderView initHeaderView];
    [self.headerView initData:self.result];
    self.headerView.x = 0;
    self.headerView.y = 0;
    HeaderWebView *webView = [[HeaderWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height-64)];
    [webView setHeaderView:self.headerView];
    webView.url = self.result.content_url;
    [self.view addSubview:webView];
}

@end
